﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TrailTable.ascx.cs"
    Inherits="Imageo.TrailTable" %>
<asp:Panel ID="pnlTrailsTableControl" runat="server" Width="100%" Height="100%" Style="text-align: left;
    vertical-align: middle; font: 14px/14px Arial, Helvetica, sans-serif;">
    <%-- 
    <asp:ListView ID="ListView2" runat="server" DataSourceID="ObjectDataSource1" GroupItemCount="4" onpagepropertieschanged="ListView1_PagePropertiesChanged">
--%>
    <asp:ListView ID="ListView1" Visible="false" runat="server" GroupItemCount="4" OnPagePropertiesChanged="ListView1_PagePropertiesChanged">
        <EmptyDataTemplate>
            <table runat="server" width="100%">
                <tr>
                    <td>
                        <div style="width: 100%; height: 400px; vertical-align: middle;" align="center">
                            <div class="detailBoxes" style="width: 200px; height: 40px;">
                                <span class="ErrorMessage">No trails were found</span></div>
                        </div>
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <LayoutTemplate>
            <table id="tblLayout" runat="server" width="100%">
                <tr runat="server">
                    <td runat="server">
                        <table id="groupPlaceholderContainer" width="100%" runat="server" border="0" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="rowPager" runat="server">
                    <td runat="server" style="text-align: center; background-color: #5D7B9D; font-family: Verdana, Arial, Helvetica, sans-serif;">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <EmptyItemTemplate>
            <td runat="server" />
        </EmptyItemTemplate>
        <ItemTemplate>
            <td runat="server" align="center">
                <div class="detailBoxes" style="width: 220px; height: 170px; border: solid 1px black;">
                    <a href="../ui/TrailDetails.aspx<%# Eval("OpenTrailUrl") %>" class="arial_heading_font_blue_16">
                        <p align="left">
                            <%# Eval("Title") %></p>
                    </a>
                    <br />
                    <div>
                        <div style="width: 150px; height: 90px; background-color: Black; vertical-align: middle;
                            text-align: center; float: left; margin: 5px;">
                            <a href="../ui/TrailDetails.aspx<%# Eval("OpenTrailUrl") %>">
                                <asp:Image ID='imgImage' runat="server" ImageUrl='<%# Eval("ImageUrl") %>' Style="max-width: 150px;
                                    max-height: 90px;" />
                            </a>
                        </div>
                        <div style="width: 50px; float: right; font: 12px/12px Arial, Helvetica, sans-serif;
                            font-weight: bold; color: #20afe0;">
                            <a href="../ui/TrailDetails.aspx<%# Eval("OpenTrailUrl") %>">Visit this trail</a>
                            <br />
                            <br />
                            <a href="<%# Eval("SearchSimilarTrailUrl") %>" style="<%# Eval("DisplaySimilarTrailOption") %>">
                                Similar Trails</a>
                            <br />
                            <a href="<%# Eval("SearchSimilarImageUrl") %>" style="<%# Eval("DisplaySimilarImageOption") %>">
                                Similar Images</a>
                        </div>
                    </div>
                    <div style="clear: both">
                        <p class="normal_font_light" align="justify">
                            <%# Eval("Description") %></p>
                        <%-- 
                            <asp:Label ID="createdLabel" runat="server" Text='<%# Eval("created") %>' />
                            <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                            <br />
                            <br />
                            latitude:
                            <asp:Label ID="latitudeLabel" runat="server" Text='<%# Eval("latitude") %>' />
                            <br />
                            longitude:
                            <asp:Label ID="longitudeLabel" runat="server" Text='<%# Eval("longitude") %>' />
                            <br />
                            numberOfannotations:
                            <asp:Label ID="numberOfannotationsLabel" runat="server" Text='<%# Eval("numberOfannotations") %>' />
                            <br />
                            <asp:CheckBox ID="publicTrailCheckBox" runat="server" Checked='<%# Eval("publicTrail") %>' Enabled="false" Text="publicTrail" />
                            <br />
                            title:
                            <br />
                            userlogin:
                            <asp:Label ID="userloginLabel" runat="server" Text='<%# Eval("userlogin") %>' />
                            <br />
                            usernick:
                            <asp:Label ID="usernickLabel" runat="server" Text='<%# Eval("usernick") %>' />
                            --%>
                    </div>
                </div>
            </td>
        </ItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server">
                </td>
            </tr>
        </GroupTemplate>
    </asp:ListView>
    <asp:ListView ID="ListView2" Visible="false" runat="server" GroupItemCount="1" OnPagePropertiesChanged="ListView2_PagePropertiesChanged">
        <EmptyDataTemplate>
            <table id="Table1" runat="server" width="100%">
                <tr>
                    <td>
                        <div style="width: 100%; height: 400px; vertical-align: middle;" align="center">
                            <div class="detailBoxes" style="width: 200px; height: 40px;">
                                <span class="ErrorMessage">No trails were found</span></div>
                        </div>
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <LayoutTemplate>
            <table id="tblLayout" runat="server" width="100%">
                <tr id="Tr1" runat="server">
                    <td id="Td1" runat="server">
                        <table id="groupPlaceholderContainer" width="100%" runat="server" border="0" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr>
                                <td>
                                    <b>Title</b>
                                </td>
                                <td>
                                    <b>Description</b>
                                </td>
                                <td>
                                    <b>Location</b>
                                </td>
                                <td>
                                    <b>Type</b>
                                </td>
                                <td>
                                    <b>Length</b>
                                </td>
                            </tr>
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="Tr2" runat="server">
                    <td id="Td2" runat="server" style="text-align: center; background-color: #5D7B9D;
                        font-family: Verdana, Arial, Helvetica, sans-serif;">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <EmptyItemTemplate>
            <td id="Td3" runat="server" />
        </EmptyItemTemplate>
        <ItemTemplate>
            <td>
                <div>
                    <a href="../ui/TrailDetails.aspx<%# Eval("OpenTrailUrl") %>">
                        <p align="left">
                            <%# Eval("Title") %></p>
                    </a>
                </div>
                <div style="width: 150px; height: 90px; background-color: Black; vertical-align: middle;
                    text-align: center; float: left; margin: 5px;">
                    <a href="../ui/TrailDetails.aspx<%# Eval("OpenTrailUrl") %>">
                        <asp:Image ID='imgImage' runat="server" ImageUrl='<%# Eval("ImageUrl") %>' Style="max-width: 150px;
                            max-height: 90px;" />
                    </a>
                </div>
                <div style="clear: both;">
                    <a href="<%# Eval("SearchSimilarTrailUrl") %>" style="<%# Eval("DisplaySimilarTrailOption") %>">
                        Find similar trails</a>
                </div>
                <br />
            </td>
            <td>
                <%# Eval("description") %>
            </td>
            <td>
                <%# Eval("title") %>
            </td>
            <td>
                <%# Eval("title") %>
            </td>
            <td>
                <%# Eval("title") %>
            </td>
        </ItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server">
                </td>
            </tr>
        </GroupTemplate>
    </asp:ListView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetTrailData"
        TypeName="Imageo.TrailTable"></asp:ObjectDataSource>
</asp:Panel>
